package com.bobbyjjw.testTaobao;

import com.bobbyjjw.client.CommonClient;
import com.taobao.api.TaobaoJsonRestClient;
import com.taobao.api.model.UserGetRequest;
import com.taobao.api.model.UserGetResponse;

/**
 * 获得某个用户的信息
 * 
 * @author Bobby.Jin
 *
 */

public class TaobaoGetUser {
	public static void main(String args[]) throws Exception {
		TaobaoJsonRestClient client = CommonClient.getInstance();
		UserGetRequest req = new UserGetRequest();
		String publicFields = "nick,sex,buyer_credit,seller_credit,location.city,location.state,location.country,created,last_visit";
		String privateFields = "location.zip,birthday";
		req.setFields(publicFields + "," + privateFields);
		req.setNick("alipublic01");
		UserGetResponse rsp = client.userGet(req);
		System.out.println(rsp.getBody());

	}

}